﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="AbingtonBooks.Pages.Profile.NewBook.Default" %>
<%@ Register TagPrefix="uc" TagName="ProfileNav" 
    Src="~/User Controls/ProfileNavigation.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="overflow:hidden;height:100%">
        <div style="overflow:hidden; height:100%">
        <div style="float:left; height:100%;">
    <uc:ProfileNav id="nav" runat="server" />
            </div>
        <div style="float:left; width:80%" >
        <table style="width:60%;margin:auto; margin-top:5%">
            <tr>
                <td>
                    <asp:Label CssClass ="wsite-form-label" ID="Label1" runat="server">Title<span class="form-required">*</span></asp:Label>
                </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" 
                        ControlToValidate="txtTitle" runat="server" 
                        ErrorMessage="Please enter the Book title" ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:TextBox CssClass="wsite-form-input wsite-input" ID="txtTitle" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label CssClass ="wsite-form-label" ID="Label2" runat="server">Author<span class="form-required">*</span></asp:Label>
                </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" 
                        ControlToValidate="txtAuthor" runat="server" 
                        ErrorMessage="Please enter the author's name" ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:TextBox CssClass="wsite-form-input wsite-input" ID="txtAuthor" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label CssClass ="wsite-form-label" ID="Label3" runat="server">ISBN<span class="form-required">*</span></asp:Label>
                </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" 
                        ControlToValidate="txtISBN" runat="server" ErrorMessage="Please enter the ISBN" 
                        ForeColor="Red"></asp:RequiredFieldValidator><br />
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" 
                        ValidationExpression="\d{10}" ControlToValidate="txtISBN" runat="server" 
                        ErrorMessage="Invalid ISBN" ForeColor="Red"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:TextBox CssClass="wsite-form-input wsite-input" ID="txtISBN" 
                        runat="server" MaxLength="10"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label CssClass ="wsite-form-label" ID="Label4" runat="server">Price<span class="form-required">*</span></asp:Label>
                </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" ControlToValidate="txtPrice" runat="server" 
                        ErrorMessage="Please enter the price" ForeColor="Red"></asp:RequiredFieldValidator><br />
                    <asp:RegularExpressionValidator ValidationExpression="^(0|[1-9]\d*(\.\d{2})?)$" 
                        ID="RegularExpressionValidator2" ControlToValidate="txtPrice" runat="server" 
                        ErrorMessage="Invalid price entry" ForeColor="Red"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:TextBox CssClass="wsite-form-input wsite-input" ID="txtPrice" 
                        runat="server" ></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label CssClass ="wsite-form-label" ID="Label5" runat="server">Image<span class="form-required">*</span></asp:Label>
                </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" 
                        ControlToValidate="fileImage" runat="server" 
                        ErrorMessage="Please upload an image" ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:FileUpload ID="fileImage" runat="server" ForeColor="White" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label CssClass ="wsite-form-label" ID="Label6" runat="server">Subject<span class="form-required">*</span></asp:Label>
                </td>
                <td><asp:Label CssClass ="wsite-form-label" ID="Label7" runat="server">Class<span class="form-required">*</span></asp:Label></td>
                <td>
                    
                    <asp:RequiredFieldValidator ControlToValidate="listClasses" 
                        ID="RequiredFieldValidator6" runat="server" 
                        ErrorMessage="Please select a class" ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:DropDownList OnTextChanged="listSubjects_TextChanged" AutoPostBack="true" ID="listSubjects" runat="server"></asp:DropDownList>
                 
                        
                     
                    
                    
                </td>
                <td>
                       <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="listSubjects" EventName="SelectedIndexChanged" />
                        </Triggers>
                        <ContentTemplate>
                    <asp:DropDownList AppendDataBoundItems="true" ID="listClasses" runat="server"><asp:ListItem Text="" Value="" /></asp:DropDownList>
                       </ContentTemplate>
                        
                    </asp:UpdatePanel>
                </td>
            </tr>
            <tr>
            <td>
                <asp:Label ID="Label8" CssClass ="wsite-form-label" runat="server" Text="Summary"></asp:Label>
            </td>
                </tr>
            <tr>
                <td>
                    <asp:TextBox ID="txtSummary" runat="server" Height="149px" TextMode="MultiLine" Width="303px"></asp:TextBox>
                </td>
            </tr>
             <tr>
            <td><asp:LinkButton CssClass="wsite-button" OnClick="btnSubmit_Click"  ID="btnSubmit" runat="server"><span class="wsite-button-inner">Submit</span></asp:LinkButton></td>
             
        </tr>
        </table>
        </div>
    </div>
  </div>
</asp:Content>
